package com.kh.rationaldrugreview.config;

import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.model.ChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import lombok.extern.slf4j.Slf4j;

/**
 * Spring AI Configuration
 * Configures ChatClient for LLM interactions
 */
@Slf4j
@Configuration
public class SpringAIConfig {
    
    /**
     * Create ChatClient bean for LLM interactions
     * Uses OpenAI-compatible API (configured as DeepSeek in application.yml)
     */
    @Bean
    public ChatClient chatClient(ChatModel chatModel) {
        log.info("Initializing Spring AI ChatClient");
        return ChatClient.builder(chatModel).build();
    }
}